package com.luckberry.murder.mapper;

import com.luckberry.murder.entity.VIP;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface VIPMapper {

    @Select("select * from vip")
    List<VIP> getVIPs();

    @Select("select * from vip where uid = #{uid}")
    VIP getVIP(int uid);

    @Insert("insert into vip(uid, time, month) VALUES (#{uid}, #{time}, #{month})")
    int addVIP(VIP vip);

    @Delete("delete vip from vip where uid = #{uid}")
    int deleteVIP(int uid);

    @Update("update vip set time = #{time}, month = #{month} where uid = #{uid}")
    int editVIP(VIP vip);
}
